﻿using Ayatta.Contract.Domain;
using System.Collections.ObjectModel;

namespace Web.Core.OrderHandler
{
    internal sealed class AutoSendHandler : IOrderHandler
    {
        private readonly Collection<IAutoHandler> handlers = new Collection<IAutoHandler>();
        public AutoSendHandler()
        {
            handlers.Add(new BidCurrencyHandler(0));
        }
        public void Process(UserTrade trade, Order order)
        {
            foreach (var item in order.OrderItems)
            {
                foreach (var handler in handlers)
                {
                    handler.Process(item);
                }
            }
        }
    }
}